package com.sunwayworld.basemodule.business.pjtask.resource.impl;

import com.alibaba.fastjson.JSONObject;
import com.sunwayworld.basemodule.business.pjtask.bean.LimsPjTaskBean;
import com.sunwayworld.basemodule.business.pjtask.resource.LimsPjFolderEquiptResource;
import com.sunwayworld.basemodule.business.pjtask.service.LimsPjFolderEquiptService;
import com.sunwayworld.framework.log.annotation.Log;
import com.sunwayworld.framework.log.annotation.LogModule;
import com.sunwayworld.framework.log.annotation.LogType;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;
import com.sunwayworld.framework.spring.annotation.GikamBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@LogModule("项目设备表")
@RestController
@GikamBean
public class LimsPjFolderEquiptResourceImpl implements LimsPjFolderEquiptResource {

    @Autowired
    private LimsPjFolderEquiptService limsPjFolderEquiptService;

    @Override
    public LimsPjFolderEquiptService getService() {
        return limsPjFolderEquiptService;
    }

    @Log(value = "新增项目设备表", type = LogType.INSERT)
    @Override
    @RequestMapping(method = RequestMethod.POST)
    public Long insert(RestJsonWrapperBean wrapper) {
        return getService().insert(wrapper);
    }

    @Override
    public JSONObject backToFolder(RestJsonWrapperBean wrapperBean) {
        return getService().backToFolder(wrapperBean);
    }

    @Override
    public JSONObject submitToReview(RestJsonWrapperBean wrapperBean) {
        return getService().submitToReview(wrapperBean);
    }

    @Override
    public JSONObject backToResult(RestJsonWrapperBean wrapperBean) {
        return getService().backToResult(wrapperBean);
    }

    @Override
    public JSONObject submitReview(RestJsonWrapperBean wrapperBean) {
        return getService().submitReview(wrapperBean);
    }

    @Override
    public JSONObject submitAbnormal(RestJsonWrapperBean wrapperBean) {
        return getService().submitAbnormal(wrapperBean);
    }

    @Override
    public JSONObject updateFormula(RestJsonWrapperBean wrapperBean) {
        return getService().updateFormula(wrapperBean);
    }

    @Override
    public List<LimsPjTaskBean> purposeSelections(Long id) {
        return getService().purposeSelections(id);
    }
}
